import 'package:flutter/material.dart';

class MailListPage extends StatefulWidget {

  final int pageIndex;

  MailListPage(this.pageIndex);

  @override
  _MailListPageState createState() => _MailListPageState();
}

class _MailListPageState extends State<MailListPage>
    with AutomaticKeepAliveClientMixin {
  List<int> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
  @override
  bool get wantKeepAlive => true;

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: data.map((n) {
        return ListTile(
          title: Text("MailListPage的第$n条"),
        );
      }).toList(),
    );
  }
}
